package com.dgshanger.sanhxiaofeisc.mvp.model

import com.dgshanger.sanhxiaofeisc.common.AppApi
import com.dgshanger.sanhxiaofeisc.entity.PayResultEntity
import com.dgshanger.sanhxiaofeisc.mvp.contract.PayResultContract
import com.xx.baseutilslibrary.network.rx.RxHelper
import com.xx.baseutilslibrary.network.rx.XxBaseHttpObserver

/**
 * Created by JacobHHH on 2018/4/20.
 */
class PayResultModel : PayResultContract.Model {

    override fun loadData(record_sn: String?, httpObserver: XxBaseHttpObserver<PayResultEntity>?) {
        AppApi.Api().getPayResultData(record_sn)
                .compose(RxHelper.io_main())
                .compose(RxHelper.start_finish(httpObserver))
                .subscribe(httpObserver)
    }
}